package springmvcdemo.controller;


import org.springframework.web.bind.annotation.*;
import springmvcdemo.model.Student;

@RequestMapping("/con1")
@RestController
public class Controller1 {
    @RequestMapping("/test1")
    public String Test1() {
        return "you had run one";
    }

    @RequestMapping(value = "/test2",method = RequestMethod.GET)
    public String test2() {
        return "只允许get请求";
    }
    @GetMapping("/test3")
    public String Test3() {
        return "我是test3";
    }
    @RequestMapping("/test4")
    public String test4(Student stu) {
        return "接收到的参数"+stu;
    }

}
